package com.lhhu.demo.service.impl;

import com.lhhu.demo.bean.NoticeMessage;
import com.lhhu.demo.mapper.NoticeMapper;
import com.lhhu.demo.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther 虎
 * @Data 2021/4/11 14:30
 * @Version 1.0
 */
@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public int updateNotice(String message1,String message2,String message3) {
        int i,j,k;
        i=noticeMapper.updateNotice(1,message1);
        j=noticeMapper.updateNotice(2,message2);
        k=noticeMapper.updateNotice(3,message3);
        return i+j+k;
    }

    @Override
    public List<NoticeMessage> getAllNotice() {
        return noticeMapper.getAllNotice();
    }
}
